package com.example.yiwei.crm.view.frament.customerDetailedMenuPackage;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.yiwei.crm.R;
import com.example.yiwei.crm.data.GetCustumer;
import com.example.yiwei.crm.entity.CustomerMessageEntity;

/**
 * Created by Administrator on 2016/12/12.
 */

public class OtherBaseFragment extends Fragment{
    private TextView txt_department,txt_creater,txt_rhfk,txt_hydj,
            txt_create_date,txt_updater,txt_next_content,txt_next_time,txt_bz;
    private CustomerMessageEntity customer;
    private Button button;
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootview = inflater.inflate(R.layout.fragment_customer_detailed_other_base, container, false);
        txt_rhfk = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_rhfk);
        txt_hydj = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_hydj);
        txt_department = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_department);
        txt_creater = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_create_people);
        txt_create_date = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_create_date);
        txt_updater = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_update_people);
        txt_next_content = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_next_content);
        txt_next_time = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_next_time);
        txt_bz = (TextView) rootview.findViewById(R.id.fragment_customer_other_base_remark);
        customer = GetCustumer.get();
        if (1==customer.getRhfk()){
            txt_rhfk.setText("未表态");
        }
        if (2==customer.getRhfk()){
            txt_rhfk.setText("糊涂");
        }
        if (3==customer.getRhfk()){
            txt_rhfk.setText("语言沟通障碍");
        }
        if (4==customer.getRhfk()){
            txt_rhfk.setText("未见面");
        }
        if (5==customer.getRhfk()){
            txt_rhfk.setText("无自主活动能力");
        }
        if (6==customer.getRhfk()){
            txt_rhfk.setText("拒绝沟通");
        }
        if (7==customer.getRhfk()){
            txt_rhfk.setText("不能说积分");
        }
        if (8==customer.getRhfk()){
            txt_rhfk.setText("有介绍意向");
        }
        if (9==customer.getRhfk()){
            txt_rhfk.setText("介绍意向强");
        }
        if (10==customer.getRhfk()){
            txt_rhfk.setText("家属有介绍意向");
        }
        if (11==customer.getRhfk()){
            txt_rhfk.setText("准优质会员");
        }
        if (12==customer.getRhfk()){
            txt_rhfk.setText("亲友近视眼");
        }
        if (13==customer.getRhfk()){
            txt_rhfk.setText("无意向");
        }
        if (14==customer.getRhfk()){
            txt_rhfk.setText("征兵入伍");
        }
        if (15==customer.getRhfk()){
            txt_rhfk.setText("其他");
        }
        if (1==customer.getHydj()){
            txt_hydj.setText("A");
        }
        if (2==customer.getHydj()){
            txt_hydj.setText("B");
        }
        if (3==customer.getHydj()){
            txt_hydj.setText("C");
        }
        if (4==customer.getHydj()){
            txt_hydj.setText("VIP");
        }
        if (5==customer.getHydj()){
            txt_hydj.setText("回收组");
        }
        txt_department.setText(customer.getBelongs_department());
        txt_next_time.setText(customer.getNext_Time());
        txt_create_date.setText(customer.getCreate_time());
        txt_next_content.setText(customer.getNext_Content());
        txt_creater.setText(customer.getCurrent_create_user_name());
        txt_updater.setText(customer.getCurrent_update_user_name());
        txt_bz.setText(customer.getAdditional_remarks());
        return rootview;
    }
}
